//
//  firstPageFirstSecctionCell_Ht.m
//  WZLProduct
//
//  Created by dllo on 16/3/19.
//  Copyright © 2016年 HaiTeng. All rights reserved.
//

#import "firstPageFirstSecctionCell_Ht.h"

@implementation firstPageFirstSecctionCell_Ht

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.contentView.layer.masksToBounds = YES;
        self.contentView.layer.cornerRadius = 4;
        self.contentView.backgroundColor = [UIColor whiteColor];
        
        self.cover_image = [[UIImageView alloc] init];
        [self.contentView addSubview:self.cover_image];
        self.cover_image.image = [UIImage imageNamed:@"TestPicture_HT.jpg"];
        
        self.index_title = [[UILabel alloc] init];
        [self.contentView addSubview:self.index_title];
        
        self.avatar_s = [[UIImageView alloc] init];
        [self.contentView addSubview:self.avatar_s];
        
        self.name = [[UILabel alloc] init];
        [self.contentView addSubview:self.name];
    }
    return self;
}


- (void)layoutSubviews{
    [super layoutSubviews];

    [self.cover_image mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.and.right.equalTo(self.contentView);
        make.height.equalTo(self.contentView.mas_height).multipliedBy(0.65);//设置宽度为self.view的一半，multipliedBy是倍数的意思，也就是，使宽度等于self.view宽度的0.5倍
    }];
    
//    [self.index_title mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.top.left.equalTo(self.cover_image).with.offset(10);
//        
//        
//    }];
    
    
}



@end
